import React from 'react';
import {Button} from 'antd';
import {useDrag} from "react-dnd";
import DivModel from './DivModel';
export default function LeftMain(props){
    const {json,jsonChange} = props;
    const widgetsList = [{
        text:'div',
        defaultConfig:{
            position:'absolute',
            width:'100px',
            height:'100px',
            border:'1px solid #000'
        }
    },{
        text:'normalcharts',
        defaultConfig:{
            position:'absolute',
            width:'100px',
            height:'100px',
            border:'1px solid #000'
        }
    },{
        text:'mapcharts',
        defaultConfig:{
            position:'absolute',
            width:'100px',
            height:'100px',
            border:'1px solid #000'
        }
    },{
        text:'reacteditor',
        defaultConfig:{
            position:'absolute',
            width:'100px',
            height:'100px',
            border:'1px solid #000'
        }
    }];
    const data = widgetsList.map(value=>{
        return <DivModel key={value['text']} {...value}/>;
    });

    return <>
        {data}
    </>;
}